package com.biancheng.biancheng.biancheng2;

import java.util.Scanner;

public class 水仙花数 {

    public static void main(String[] args){
        int a,b;
        Scanner a1=new Scanner(System.in);
        a=a1.nextInt();
        b=a1.nextInt();

        for (int n = a; n <=b; n++) {
            int n100,n10,n1;
            n100=n/100;
            n10=n/10%10;
            n1=n%10;
            if(n==n100*n100*n100+n10*n10*n10+n1*n1*n1){
                System.out.println(n);
            }
        }
    }

}
